package com.wmh.baseservice.user.pojo;

import com.baomidou.mybatisplus.annotation.IdType;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-10-31
 */
@ApiModel(value="UsShopCar对象", description="用户购物车表")
public class UsShopCar implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "用户id")
    private Long usId;

    @ApiModelProperty(value = "商品id")
    private Long goodsId;

    @ApiModelProperty(value = "1平台商品 2商家商品 3果蔬商品")
    private Integer type;

    @ApiModelProperty(value = "数量/重量")
    private Double count;

    @ApiModelProperty(value = "商家id")
    private Long merchantId;

    @ApiModelProperty(value = "特殊类型	果蔬：0采摘、1种植")
    private Integer specialType;

    @ApiModelProperty(value = "土地id")
    private Long plotId;

    @TableField(exist = false)
    private String avatar;

    @TableField(exist = false)
    private String title;

    @TableField(exist = false)
    private BigDecimal price;

    @TableField(exist = false)
    private Integer hasCourier;

    public Integer getHasCourier() {
        return hasCourier;
    }

    public void setHasCourier(Integer hasCourier) {
        this.hasCourier = hasCourier;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Long getId() {
        return id;
    }

    public UsShopCar setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public UsShopCar setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public UsShopCar setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public UsShopCar setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public UsShopCar setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public UsShopCar setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public Long getUsId() {
        return usId;
    }

    public UsShopCar setUsId(Long usId) {
        this.usId = usId;
        return this;
    }
    public Long getGoodsId() {
        return goodsId;
    }

    public UsShopCar setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public UsShopCar setType(Integer type) {
        this.type = type;
        return this;
    }
    public Double getCount() {
        return count;
    }

    public UsShopCar setCount(Double count) {
        this.count = count;
        return this;
    }
    public Long getMerchantId() {
        return merchantId;
    }

    public UsShopCar setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
        return this;
    }
    public Integer getSpecialType() {
        return specialType;
    }

    public UsShopCar setSpecialType(Integer specialType) {
        this.specialType = specialType;
        return this;
    }
    public Long getPlotId() {
        return plotId;
    }

    public UsShopCar setPlotId(Long plotId) {
        this.plotId = plotId;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String US_ID = "us_id";

    public static final String GOODS_ID = "goods_id";

    public static final String TYPE = "type";

    public static final String COUNT = "count";

    public static final String MERCHANT_ID = "merchant_id";

    public static final String SPECIAL_TYPE = "special_type";

    public static final String PLOT_ID = "plot_id";

    @Override
    public String toString() {
        return "UsShopCar{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", usId=" + usId +
            ", goodsId=" + goodsId +
            ", type=" + type +
            ", count=" + count +
            ", merchantId=" + merchantId +
            ", specialType=" + specialType +
            ", plotId=" + plotId +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            UsShopCar.ID
            ,UsShopCar.STATUS
            ,UsShopCar.REMARK
            ,UsShopCar.VERSION
            ,UsShopCar.CREATE_TIME
            ,UsShopCar.UPDATE_TIME
            ,UsShopCar.US_ID
            ,UsShopCar.GOODS_ID
            ,UsShopCar.TYPE
            ,UsShopCar.COUNT
            ,UsShopCar.MERCHANT_ID
            ,UsShopCar.SPECIAL_TYPE
            ,UsShopCar.PLOT_ID
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}